﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using NoteSystem.Utils;

namespace NoteSystem
{
    /// <summary>
    /// DelCommentHandler 的摘要说明
    /// </summary>
    public class DelCommentHandler : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            int cid = Convert.ToInt32(context.Request["cid"]);
            int flag = DbHelper.ExecuteSql("delete from comments where id=" + cid);
            if (flag > 0)
            {
                context.Response.Write("true");
            }
            else
            {
                context.Response.Write("false");
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}